package com.centling.smartSealForPhone.utils;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;

import com.centling.smartSealForPhone.constants.GlobalData;
import com.wsdk.service.BluetoothLeService;

/**
 * @author fionera
 */
public class BleDisconnectReceiver
        extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        if (TextUtils.equals(intent.getAction(), BluetoothLeService.ACTION_GATT_DISCONNECTED)) {
            GlobalData.isConnect = false;
            LogUtil.e("Global Disconnect detected.");
        }
    }
}
